package com.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.base.BasePageReq;
import com.entity.Artical;
import com.entity.ArticalChannel;
import com.req.RssPageReq;
import com.res.ArticalRes;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticalRepository extends BaseMapper<Artical> {
    IPage<ArticalRes> homePage(IPage<ArticalRes> pages, @Param("req") BasePageReq pageReq);

    IPage<ArticalRes> channelPage(IPage<ArticalRes> pages,@Param("req") RssPageReq pageReq, @Param("channels") List<ArticalChannel> articalChannelList);

    void replaceWordPressUrl(@Param("oldUrl") String oldUrl,@Param("newUrl") String newUrl,@Param("origin") String origin);
}
